﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using WickedSick.ClientComponents.Music;

namespace SDB
{
    public class SongItemStyleSelector: StyleSelector
    {
        public override Style SelectStyle(object item, DependencyObject container)
        {
            string templateKey;
            if (item is Artist)
            {
                templateKey = "ArtistStyle";
            }
            else if (item is Album)
            {
                templateKey = "AlbumStyle";
            }
            else if (item is Song)
            {
                templateKey = "SongStyle";
            }
            else
            {
                return base.SelectStyle(item, container);
            }
            return (Style)((FrameworkElement)container).FindResource(templateKey);
        }
    }
}
